package com.tencreat.common.enums;

import com.baomidou.mybatisplus.annotation.EnumValue;
import com.fasterxml.jackson.annotation.JsonValue;

public enum BalanceBusinessType {
    /**
     * 余额业务类型枚举
     */
    RECHARGE(1, "代采购"),//代采购需减少额度
    ACCOUNT_RECHARGE(2, "后台代采购"),
    WITHDRAW(3, "提现"),
    //CUT_BACK(4,"砍价返回余额"),
    PARTNERBONUS(4, "合伙人奖励"),
    PT_INCOME(5,"团队管理收益"),
    USE(6,"使用"),
    GOODS_REFUND(7,"退款退货"),
    GOODS_REFUND_V(8,"取消订单"),
    DIRECT_REFERRER(9,"推荐充值奖励-直推"),
    INDIRECT_REFERRER(10,"推荐充值奖励-间推"),
    WITHDRAW_FAIL(11, "提现失败退回"),
    ACCOUNT_SUB(12, "后台减少"),
    ORDER_ADD(13,"订单收入"),
    ORDER_SUB(14,"订单支出"),
    ORDER_CONFIRM(15,"确认收货"),
    VERIFICATION(16,"核销"),
    GIFT_BY_COMSUMER(17,"充值消费券赠送"),
    SCAN(18,"扫码订单"),
    STORE_SALE(19,"销售"),
    IN_STORE_REFERRER(20,"推荐商家奖励-间推"),
    STORE_REFERRER(21,"推荐商家奖励-直推"),

    RECHARGE_DIRECT(22,"直推用户"),//直推用户增加代采购额度
    RECHARGE_INDIRECT(23,"间推用户"),//间推用户增加代采购额度
    RECHARGE_REGISTER(24,"注册成功"),//注册成功增加代采购额度
    RECHARGE_TEAM(25,"团队用户"),//团队用户增加代采购额度
    RECHARGE_CONSUME(26,"消费赠送"),//消费增加代采购额度

    RECHARGE_RECOVER(27,"恢复额度"),//每年一月一日恢复去年扣除的额度

    ;


    @EnumValue
    private final int value;
    @JsonValue
    private final String desc;

    public int getValue() {
        return value;
    }

    public String getDesc() {
        return desc;
    }

    BalanceBusinessType(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }

    /**
     * 单个枚举的展示
     */
    @Override
    public String toString() {
        return value + "-" + desc;
    }
}
